pp108 : Rename (File or Directory)

Rename (File or Directory)


This Web service operation is used to rename a file or directory on the FTP server.

SOAP Request

<rename xmlns="http://schemas.cordys.com/1.0/ftp">
    <server>ftpserver</server>
    <user>anonymous</user>
    <password>[email protected]</password>
    <portno>21</portno>
    <notification-subject>FTP</notification-subject>
    <from>\readme.txt</from>
    <to>\readme_rename.txt</to>
</rename>

Request Parameters

Parameters

Description

server

Name of the FTP server to which the files are to be uploaded

user

Name of the FTP user

password

Password for the FTP user

portno

The port number used by the FTP server. This tag is optional.

notification-subject

Notification subject on which the user has to subscribe to the Event service, to obtain the status of the request

from

The path of the file or directory which needs to be renamed

to

The new name for the specified file or directory


SOAP Response

<renameResponse xmlns="http://schemas.cordys.com/1.0/ftp" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
    <server xmlns="http://schemas.cordys.com/1.0/ftp" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">ftpserver</server>
    <user xmlns="http://schemas.cordys.com/1.0/ftp" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">anonymous</user>
    <portno xmlns="http://schemas.cordys.com/1.0/ftp" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">21</portno>
    <notification-subject xmlns="http://schemas.cordys.com/1.0/ftp" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">FTP</notification-subject>
    <from xmlns="http://schemas.cordys.com/1.0/ftp" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">\readme.txt</from>
    <to xmlns="http://schemas.cordys.com/1.0/ftp" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">\readme_rename</to>
    <statuscode>250</statuscode>
    <status>RNTO command successful. </status>
</renameResponse>